import Vue from 'vue'
import App from './App.vue'
import router from './router'
import './plugins/element.js'
//引入icon包
import './assets/icon/iconfont.css'
//添加全局样式
import './assets/css/global.css'
//导入axios
import axios from 'axios'
//挂载axios
Vue.prototype.$http=axios
//设置访问跟路径
axios.defaults.baseURL="http://localhost:8888"

axios.interceptors.request.use(config => {
  console.log(config);
  // 请求头挂载信息
  config.headers.Authorization = window.sessionStorage.getItem("flag");
  // 在最后必须return config
  return config;
})

Vue.config.productionTip = false

new Vue({
  router,
  render: h => h(App)
}).$mount('#app')
